package com.skivingcloud.admin.conf;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 公共配置
 */
@Component
@ConfigurationProperties("skivingcloud.common")
public class CommonPropertiesConfig {
    /**
     * feign相关配置
     */
    private FeignProperties feign;
    /**
     * 是否启用多租户
     */
    private boolean enabledTenant = false;

    public FeignProperties getFeign() {
        return feign;
    }

    public void setFeign(FeignProperties feign) {
        this.feign = feign;
    }

    public boolean getEnabledTenant() {
        return enabledTenant;
    }

    public void setEnabledTenant(boolean enabledTenant) {
        this.enabledTenant = enabledTenant;
    }

    public static class FeignProperties {
        private String accessToken = "";
        private String username;
        private String password;

        public String getAccessToken() {
            return accessToken;
        }

        public void setAccessToken(String accessToken) {
            this.accessToken = accessToken;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }
    }
}
